//package nancal.mp.comm
//
//
//import java.io.InputStream
//import java.io.Serializable
//import java.nio.charset.Charset
//import java.time.LocalDate
//import java.time.LocalDateTime
//import java.util.*
//import java.util.function.Function
//
//
///**
// * Created by udi on 17-5-22.
// */
//object SystemContext {
//
////    val loginSessionKey :String
////        get() { return systemName + "_LoginUser_"}
//
////    var proxy_client_ip_header: String = "X-Forwarded-For";
//
////    private var _userName = ThreadLocal<String>()
////    val userName: String
////        get() {
////            if (_userName.get() == null) {
////                if( getUserNameFunc == null){
////                    return ""
////                }
////                _userName.set(getUserNameFunc!!());
////            }
////            return _userName.get()
////        }
////
////    private var _clientIp = ThreadLocal<String>()
////
////    val clientIp: String
////        get() {
////            if (_clientIp.get() == null) {
////                if( getClientIpFunc == null){
////                    return ""
////                }
////                _clientIp.set(getClientIpFunc!!());
////            }
////            return _clientIp.get()
////        }
////
////
////    var getUserNameFunc: (() -> String)? = null
////    var getClientIpFunc: (() -> String)? = null
//    /**
//     * 第一个参数是 token 值 .
//     * 第二个参数是 字典中的保存 token 的 key : 如: sessionAttr:OpenSession
//     */
////    var getSessionData: ((String,String) -> Serializable?)? = null
//}
//
